// import count from '@dfeidao/atom-nodejs/db/count';
import query from '@dfeidao/atom-nodejs/db/query';
// import { systemid } from '../../atom/config';

interface Message {
	user_no: string;
	productid: string;
}

export default async function atom(msg: Message, action_id: string, session_id: string) {
	// 查询数据
	const q = query(action_id, session_id, '12');
	// 查询数据总条数
	// const c = count(action_id, session_id, systemid);
	q.prepare('pub_user', ['user_name', 'avatar_path'], { usercode: msg.user_no, productid: msg.productid }, 200, 1, [], []);
	const [data] = await q.exec();// 数据

	return { data };
}
